// //blob 转 base64
	export let getBase64Image=function(src){
		   return new Promise((resolve,reject)=>{
				 var img=new Image();
				 img.setAttribute('crossOrigin', 'anonymous');
				 img.src=src;
				 img.onload=function(){
				 				 var canvas = document.createElement("canvas");// 创建一个canvas
				 				 canvas.width = img.width; // 设置对应的宽高
				 				 canvas.height = img.height;
				 				 var ctx = canvas.getContext("2d"); // 二维绘图环境
				 				 ctx.drawImage(img, 0, 0, img.width, img.height); // 将图片画在画布上
				 				 var ext = img.src.substring(img.src.lastIndexOf(".") + 1).toLowerCase(); // 获取到图片的格式
				 				 var dataURL = canvas.toDataURL("image/" + ext); // 得到base64 编码的 dataURL
				 				 resolve(dataURL)
				 }
				 setTimeout(()=>{
					 resolve(null)
				 },2000)
			 })
	 }

